package com.ruoyi.project.manage.guide.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.manage.guide.mapper.DwWatchGuideMapper;
import com.ruoyi.project.manage.guide.domain.DwWatchGuide;
import com.ruoyi.project.manage.guide.service.IDwWatchGuideService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 动物观赏指南Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-04
 */
@Service
public class DwWatchGuideServiceImpl implements IDwWatchGuideService 
{
    @Autowired
    private DwWatchGuideMapper dwWatchGuideMapper;

    /**
     * 查询动物观赏指南
     * 
     * @param id 动物观赏指南主键
     * @return 动物观赏指南
     */
    @Override
    public DwWatchGuide selectDwWatchGuideById(Long id)
    {
        return dwWatchGuideMapper.selectDwWatchGuideById(id);
    }

    /**
     * 查询动物观赏指南列表
     * 
     * @param dwWatchGuide 动物观赏指南
     * @return 动物观赏指南
     */
    @Override
    public List<DwWatchGuide> selectDwWatchGuideList(DwWatchGuide dwWatchGuide)
    {
        return dwWatchGuideMapper.selectDwWatchGuideList(dwWatchGuide);
    }

    /**
     * 新增动物观赏指南
     * 
     * @param dwWatchGuide 动物观赏指南
     * @return 结果
     */
    @Override
    public int insertDwWatchGuide(DwWatchGuide dwWatchGuide)
    {
        dwWatchGuide.setCreateTime(DateUtils.getNowDate());
        return dwWatchGuideMapper.insertDwWatchGuide(dwWatchGuide);
    }

    /**
     * 修改动物观赏指南
     * 
     * @param dwWatchGuide 动物观赏指南
     * @return 结果
     */
    @Override
    public int updateDwWatchGuide(DwWatchGuide dwWatchGuide)
    {
        return dwWatchGuideMapper.updateDwWatchGuide(dwWatchGuide);
    }

    /**
     * 批量删除动物观赏指南
     * 
     * @param ids 需要删除的动物观赏指南主键
     * @return 结果
     */
    @Override
    public int deleteDwWatchGuideByIds(String ids)
    {
        return dwWatchGuideMapper.deleteDwWatchGuideByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除动物观赏指南信息
     * 
     * @param id 动物观赏指南主键
     * @return 结果
     */
    @Override
    public int deleteDwWatchGuideById(Long id)
    {
        return dwWatchGuideMapper.deleteDwWatchGuideById(id);
    }
}
